OBJECTS=client.o log.o
CXXFLAGS=-W -Wall -g -I../ -I/usr/include/xml2/

all: $(OBJECTS)

# pull in dependency info for existing .o files
# sometimes (when renaming files) make will generate errors
# run 'make clean' to solve the problem
-include $(OBJECTS:.o=.d)

# compile and generate dependency info
$(OBJECTS): %.o: %.cc
		g++ -c $(CXXFLAGS) $*.cc -o $*.o
		g++ -MM $(CXXFLAGS) $*.cc > $*.d

# remove all objects
clean:
		rm -f *.o *.d
